package com.itheima.reggie.service;

import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.dto.DishDto;
import com.itheima.reggie.entity.Page;
import com.itheima.reggie.entity.R;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface DishService {

    void save(DishDto dishDto);

    R<Page<DishDto>> page(Integer page, Integer pageSize, String name);

    R<DishDto> findById(Long dishId);

    @Transactional
    void update(DishDto dishDto);

    List<DishDto> findByCategoryId(Long categoryId,Integer status);

    void updateStatus(Integer status, List<Long> ids);


    void deleteByIds(List<Long> ids);
}
